Fix warning

Ensure we fall back to returning NULL when creating server or client
plugins if conditions are not met.