Adding method to test whether the key exists, even if it is null.