guard against nulls