Fixed case where object being compared to was null, added tests for that case