prevent crash on error with null value