Fixed NPE in isSiteId()

Fix #1004 - fixed NPE caused by calling equals() on null result from getSiteId()