Changed type to type_ for __init__() to eliminate shadowing of builtin type.
Simplified initial compound compare in __init__().