Fixed small bug

Needed to check returnData for type in order to remove errror where
trying to iterate nonetype
Updated. Removed buggs.