isValidMD5() now check length AND hex characters

Changes:

- isValidMD5() now check length AND hex characters.
- code look optimizations.
sorry to be a dick, can you remove the extra parenthesis?