check type of data returned