prevent crash on undefined val