prevent calling permit on nil