With nukes Pakistan should not fear any full on invasion.When and if war comes to Pakistan you can be sure any enemy will be given a run for their money however long it takes.
a large army and nuclear deterrence is costly to maintain however.
Pakistan should be careful not to focus too much on military but forget economic foundation. (As soviet union did)