Improve type-checker for optional arg functions
Incorporate PR feedback