added check for nil input to markdown rendering, added tests for nil input