add utility functions

created utility functions that determine if an object is a certain
type.