Prevent a crash when scheme is null for some reason.

Quick fix to prevent a NullPointerException when scheme is null.