Adding Validity checker for Chemical Formula input.