fixed empty string to primitive bug - fixes #28