check the existence of required objects before using them
updated the Csrf facade interface