surrounded valueOf(args[0]) with try-catch

Please verify the fix for issue1.