Checked if HashMap returns an object which is null.