Use isFileSync instead of existsSync
Guard against opened view not being a MarkdownPreviewView

This has been reported to bugsnag many times yet I can't figure
out why it is happening so I'm putting this guard in here so it
doesn't error at least and hopefully we can find reproduction steps.
Prepare 0.38.0 release