replaced a string comparison for performance and type safety reasons