Fix: datetime property of entity is null

Fixes an error, when datetime property of entity is null, javascript throws `Uncaught TypeError: Cannot read property 'timestamp' of null`