With false as a default value we can use this function without arguments to check access if our required access level is "superadmin" and it will still return false (or throw Exception in case of checkUserHasAccess) for other values of required access level.

Also thanks for pointing here, there should be === instead of == for checking for 0.