Validating setter and introducing getPrimitiveType