Fixed error when a passed argument is null.