check typeof data