isValidMD5() now check length AND hex characters

Changes:

- isValidMD5() now check length AND hex characters.
- code look optimizations.