fixed class member type documentation
added type casting
added a type check