null check for script before rule creation