Fixes #479

Perhaps `getTo()` should just return an empty array instead of `null`, but this fix has fewer potential ramifications.
Please fix the cs here. The else should be on the same line as the closing brace: `} else {`.