core: add null checks in equal methods

Fix findbugs errors regarding missing null checks in recently added
'equal' methods.

Change-Id: I46d3d4d509e6b1657e4713630a8b218b21f44aa1
Signed-off-by: Arik Hadas <ahadas@redhat.com>