adding extra check to improve performance on Primitive converters