Fix typo
Fix typo
Check by enum in toArray method