```
from hashlib import md5
md5 = None
if condition == True:
md5 = md5(local_file.read_bytes()).hexdigest()
```
It took me too long to realise why #Python was complaining that NoneType wasn't callable...
Yes, I need sleep...
(For the non-coders or other sleep-deprived, I was overwriting the function I was calling with 'nothing' by reusing the function name as variable name...)