Fixed: considering Chrome case where invalid input strings will be read as empty string.

Fixes #2.