Use case-when to be rubyish

Use case-when instead of if-else to check the type of a value.