[ERROR FIXED]: Iterating NoneType