Implement typeof() function