fix == comparison when not same object type