handle blank string as nil