Use the or operator instead:

```
if (doc.value[0] == proj_name) or (doc.value[0] == proj_name.lower()):
```