Add #out_of_range? method

closes #306, and closes #366