Added validation for undefined legend bindings