Allow inheritance check for non-class types

The TypeWithDict class (our replacement for Reflex::Type) has checks to see if one type inherits from another type.  Currently, these checks will throw an exception if one or both of the types in question is not a class.  The check should be more general.  This pull request changes the check for inheritance to simply return false if one or both of the types is not a class.
Please merge promptly unless there are issues.