Fixed possible NULL deference and added warning if Unsafe isn't accessible