Fixing issue #780.

Entity->modified() behaves correctly with empty values (empty string,
zero and null).