Fixed issue #1027

Since I've not a test case I've added more checks about Nullity. Hope
it's enough!
Merge branch 'master' of https://github.com/nuvolabase/orientdb