Fix TypeError values is null #1

Fix issues #1