Added check for nameBuilder

Please also initialize the variable to be an empty builder