Fixed None Type Error in Preprocessing