Checking if hasPermission returns true or false.