dataCheck function

Checks if data is in correct format.