Do a null check when checking permissions