Added is_empty method.