Add guard
Fix undefeined method [] for nil when using Model.require_permission