Renaming toArray to valueOf