Fixes #6499 by adding validation for blank names