Allow 0 in string form in addJavascriptVar

Signed-off-by: Yoshi2889 <rick.2889@gmail.com>
Merge pull request #2163 from Yoshi2889/js-var-fix

Allow 0 in string form in addJavascriptVar