Add null checks for permissions and messaging