Only validate format if instance value is string

validateFormat returns no error if instance is no string (like with other string constraints, like validateMinLength)