ensure mongo port is int