Getting a null error when adding script with form