add new helper functions to check primary and secondary addresses
replace address parameter checks with new helper functions
replace address parameter checks with new helper functions
fix logic of secondary address check
Merge pull request #34 from lategoodbye/master

Address check functions