Check fd is valid.