Added num type checking

Also removed } comments