getLineOfSight() returns a List<BlockTargetResult>: each member of that list will have a non-null getBlock(), but only the last element could possibly have a non-null getTargetFace() and getTargetLocation() return (and it might not, if the line of sight doesn't intersect that block's hitbox either).