Only run policy checking isSocket for those actions which actually need one