Type checking for initialization function