better null pointer checks at cloud number / canonicalid