Completed check_decl to check function declaration