Fixing supertypeof to handle all types