Add checks for  actions to avoid notices.
Check  action to avoid notice.