Added context object existence checks to auth expressions