title: Empty string to nullable type conversion using Automapper 3.0?
body: <p>I'm trying to convert properties on source object of strings to destination object properties of nullable datatypes(int?,bool?,DateTime?). properties of type string on my source can be empty and when they are empty an equivalent null should be mapped on destination property.It works fine when property has value but when it is empty
  It throws an exception {"String was not recognized as a valid Boolean."}</p>
  
  <pre><code>public class SourceTestString
  {
    public string IsEmptyString {get; set;}
  }
  
  public class DestinationTestBool
  {
    public bool? IsEmptyString {get; set;}
  }
  </code></pre>
  
  <p>My Converter class</p>
  
  <pre><code>public class StringToNullableBooleanConverter : ITypeConverter&lt;string,bool?&gt;
   {
       public bool? Convert(ResolutionContext context) 
       {
          if(String.IsNullOrEmpty(System.Convert.ToString(context.SourceValue)) ||  String.IsNullOrWhiteSpace(System.Convert.ToString(context.SourceValue)))
           {
              return default(bool?);
           }
           else
           {
              return bool.Parse(context.SourceValue.ToString()); 
           }
        }
    }
  </code></pre>
  
  <p>Create Map </p>
  
  <pre><code>AutoMapper.Mapper.CreateMap&lt;string,bool?&gt;().ConvertUsing(new StringToNullableBooleanConverter());
  </code></pre>
  
  <p>Map Method</p>
  
  <pre><code>SourceTestString source = SourceTestString();
  source.IsEmptyString = ""; 
  var destination = Mapper.Map&lt;SourceTestString,DestinationTestBool&gt;(source);
  </code></pre>