Added null pointer checks when we attempt to validate the signature