Return false in case one of the values is null

Fixes https://github.com/owncloud/core/issues/11042