Validating typedef objects and adding weinre debugging