Updated to only validate if not blank