A simple way to manage multiple typed optional arguments to javascript functions