Small refactoring for access check
Small refactoring for access check