Nonetype Object Has No Attribute Lower