cleaned up code at Type/Number and Type/Object assertions