💡 Summary
DRY out repeated code for detecting malformed scan targets introduced in #17
Motivation and context
As suggested by @jsf9k, it's always best to minimize code duplication wherever possible. See #17 (comment) for more info.
Implementation notes
None
Acceptance criteria