added a try except to 
        ##  Now clean up the expressions
        for eachExp in cmds.ls(type = 'expression'):
            if 'oceanLock' in eachExp:
                cmds.delete(eachExp)