Null Reference Errors with Task ExtendedProperties
If you are dealing with Workflow tasks that are giving null reference errors that are not showing up if the workflow is being debugged (They appear in the error logs, but not in Visual Studio), then check that none of the ExtendedProperties values are being set to null.
An empty string, or 0 is fine, but they can not be null on the creation of the task, as this will then error in the task creation.