@phoenix24 answer actually helped me (whose own asnwer did not solve my problem btw). The correct arguments for setCenter is
map.setCenter({lat:LAT_VALUE, lng:LONG_VALUE});
Google Documentation
By the way if your variable are lat and lng the following code will work
map.setCenter({lat:lat, lng:lng});
This actually solved my very intricate problem so I thought I will post it here.