updated strip function to handle any value