Added in a non-null check.