Avoid possible NPE when getting permissions from modules policy