Updating length to handle Arrays, Objects, and Strings