fixed null pointer exception when script input is empty or only hidden content