Better error handling for helpers