Ok, I think I'm going to leave it like this, just because it's extra security. This way, I know in the Android code at all times that language should be valid. I feel like the Android code shouldn't depend on the PHP layer to handle its errors for it, but you're right, in this case it is pretty trivial.