Implemen IsType and IsEqual methods.