Validate app names

I'm not sure if this is good approach but it seems better than returning a 500.