Fixed #23196 -- Don't translate empty string as gettext metadata

Returns empty value of corresponding type in case of empty string.
Actually this part of code[303-309] was not changed by me, I just made an indent here because of added `if`.
Anyway, It's good to improve the code. Your suggestion really decrease the length the code. However, the logic is changed a bit, now it fallbacks in both cases "" and None, before it was only None. I'll check if it affects on anything.