fix non nil return issues + type checked utils