Fixed error where sensor.js may try to parse an empty string.