improvement
fix case of .currentScript property equal null