Fixed crash when passing a number
Fixes blackberry/BB10-WebWorks-Framework#511