Repository: mlflow/mlflow

Issue:
mlflow server error when not using static-prefix flag
### System information
- **Have I written custom code (as opposed to using a stock example script provided in MLflow)**: No
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: MacOS Sierra 10.12.6 
- **MLflow installed from (source or binary)**: source, from commit 52672e5
- **MLflow version (run ``mlflow --version``)**: mlflow, version 0.3.0
- **Python version**: Python 3.6.6 :: Anaconda, Inc.
- **npm version (if running the dev UI): N.A
- **Exact command to reproduce**: mlflow server --file-store `pwd` --default-artifact-root gcs://arinto-dev/ --host 0.0.0.0

### Describe the problem
I could not start mlflow tracking server. Detailed error is in the logs section. It seems the server fails when we doesn't supply value to `--static-prefix` option. 

Looking at the code, rhe [_validate_static_prefix in mlflow/cli.py](https://github.com/databricks/mlflow/blob/5fa687a0ddcc30f291e865d1b62972c90f0b923b/mlflow/cli.py#L152) doesn't handle the default value (`None`) supplied in [the CLI entry point](https://github.com/databricks/mlflow/blob/5fa687a0ddcc30f291e865d1b62972c90f0b923b/mlflow/cli.py#L175)

### Source code / logs
```
(mlflow-dev) arinto-mbp-tvlk:mlflow-gcs arinto$ mlflow server --file-store `pwd` --default-artifact-root gs://arinto-dev/ --host 0.0.0.0
Traceback (most recent call last):
  File "/Users/arinto/anaconda3/envs/mlflow-dev/bin/mlflow", line 11, in <module>
    load_entry_point('mlflow', 'console_scripts', 'mlflow')()
  File "/Users/arinto/anaconda3/envs/mlflow-dev/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/arinto/anaconda3/envs/mlflow-dev/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/arinto/anaconda3/envs/mlflow-dev/lib/python3.6/site-packages/click/core.py", line 1064, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/Users/arinto/anaconda3/envs/mlflow-dev/lib/python3.6/site-packages/click/core.py", line 621, in make_context
    self.parse_args(ctx, args)
  File "/Users/arinto/anaconda3/envs/mlflow-dev/lib/python3.6/site-packages/click/core.py", line 880, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/Users/arinto/anaconda3/envs/mlflow-dev/lib/python3.6/site-packages/click/core.py", line 1404, in handle_parse_result
    self.callback, ctx, self, value)
  File "/Users/arinto/anaconda3/envs/mlflow-dev/lib/python3.6/site-packages/click/core.py", line 78, in invoke_param_callback
    return callback(ctx, param, value)
  File "/Volumes/tvlk-repo/github/mlflow/mlflow/cli.py", line 152, in _validate_static_prefix
    if not value.startswith("/"):
AttributeError: 'NoneType' object has no attribute 'startswith'
```


Discussion:

Resolving patch:
diff --git a/mlflow/cli.py b/mlflow/cli.py
--- a/mlflow/cli.py
+++ b/mlflow/cli.py
@@ -149,10 +149,11 @@ def _validate_static_prefix(ctx, param, value):  # pylint: disable=unused-argume
     Conforms to the callback interface of click documented at
     http://click.pocoo.org/5/options/#callbacks-for-validation.
     """
-    if not value.startswith("/"):
-        raise UsageError("--static-prefix must begin with a '/'.")
-    if value.endswith("/"):
-        raise UsageError("--static-prefix should not end with a '/'.")
+    if value is not None:
+        if not value.startswith("/"):
+            raise UsageError("--static-prefix must begin with a '/'.")
+        if value.endswith("/"):
+            raise UsageError("--static-prefix should not end with a '/'.")
     return value
 
 


Test patch:
diff --git a/tests/test_cli.py b/tests/test_cli.py
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -5,6 +5,9 @@
 
 
 def test_server_static_prefix_validation():
+    with mock.patch("mlflow.cli._run_server") as run_server_mock:
+        CliRunner().invoke(server)
+        run_server_mock.assert_called_once()
     with mock.patch("mlflow.cli._run_server") as run_server_mock:
         CliRunner().invoke(server, ["--static-prefix", "/mlflow"])
         run_server_mock.assert_called_once()