check typeof function