Check type of script in evalScript function

Signed-off-by: dingxin <dingxin.git@gmail.com>