Did you run into an instance where customAttribute was null? I think its reasonable to assume it will never be null.