Better handling of missing/invalid data