this comparison is redundant. if obj is null then the instanceof check will fail