null checks for brain bug