Fixed lower() being called on non str objects

Patch for ctnr_sort pull request. 
Fixed by casting 'value' as a string before calling lower.