add nil protection in setters