inverted logic in if statement for parsing types.