[master 4/7] Transform the is_name_valid() into an instance method