Checks null instead of catching exeptions