Better checking before using `in` operator on

Fixes #18
Merge pull request #19 from tivac/issue-18

Better checking before using `in` operator on step Arrays