Refactoring to allow non-optional type accessor checks