TypeError thrown

helper_get_all_blocks(): Return value must be of type array|bool, null returned