javascript update to allow the user to pass empty strings as the identity