removed lo-dash dependency, and added isType function