Issue #1 Alternative Solution - Using is_a? instead of string comparison

Here's an attempt to use `is_a?` instead of string comparisons.